

//点击组队按钮触发

// @ts-ignore
export async function execute(client_id,message_json) {
    let login_characters = G.Characters.get_current_login_characters(client_id);

    if (login_characters["队伍"] === 0) {
        //设置鼠标样式为组队
        ClientUtils.send_client_message(client_id, 4001, 1);
    } else {
        //如果有队伍就发送队伍信息，打开弹窗
        let team_data = G.TeamUtils.get_team_data(login_characters["队伍"]);
        if (team_data !== undefined) {
            let send_team_data = G.TeamUtils.build_send_team_data(login_characters["队伍"]);
            ClientUtils.send_client_message(client_id, 4002, send_team_data);
        } else {
            //队伍数据丢失，设置鼠标样式为组队
            ClientUtils.send_client_message(client_id, 4001, 1);
        }
    }
}

